﻿;(function ($) {
    var isSupported = 'placeholder' in document.createElement('input');
    $.fn.placeholder = function(){
        if (isSupported) return;
        var checkVal = function(t){
        	if(t.val() === ''){
          		t.prev().show();
          	}else{
          		t.prev().hide();
          	}
        };
        $(this).bind('focus blur keydown paste', function(){
        	var t = $(this);
        	setTimeout(function(){
	        	checkVal(t);
        	});
        }).prev().show().click(function(){
        	$(this).next().focus();
        });
    };
})(jQuery);
